﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace flowerWebApi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class FlowerController : ControllerBase
    {
        [HttpGet]
        public List<Flower> GetFlowers()
        {
            List<Flower> flowers = new List<Flower>();
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9012676.jpg_220x240.jpg", productTitle = "爱情 · 初心如一/红玫瑰款", productSub = "", priceNum = "194", productSell = "已售 2.0万 件" });
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9012578.jpg_220x240.jpg", productTitle = "爱情 · 深情挚爱/33枝", productSub = "2024热卖款", priceNum = "343", productSell = "已售 2.1万 件" });
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9012699.jpg_220x240.jpg", productTitle = "爱情 · 初心如一/粉玫瑰款", productSub = "", priceNum = "194", productSell = "已售 6328 件" });
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9012718.jpg_220x240.jpg", productTitle = "爱情 · 紫因有你", productSub = "", priceNum = "283", productSell = "已售 803 件" });
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9012615.jpg_220x240.jpg", productTitle = "爱情 · 星辰大海/33枝", productSub = "畅销碎冰蓝玫瑰", priceNum = "401", productSell = "已售 4219 件" });
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9012709.jpg_220x240.jpg", productTitle = "爱情 · Love you", productSub = "2024新款", priceNum = "271", productSell = "已售 4469 件" });
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9012587.jpg_220x240.jpg", productTitle = "爱情 · 百事合意/粉玫瑰香水百合plus", productSub = "百合粉玫瑰花束", priceNum = "309", productSell = "已售 9998 件" });
            flowers.Add(new Flower() { href = "https://www.hua.com/", imageUrl = "/image/9010855.jpg_220x240.jpg", productTitle = "爱情 · 用心爱你", productSub = "畅销99枝玫瑰", priceNum = "689", productSell = "已售 4.8万 件" });

            return flowers;
        }
    }
}